//	Project:	HexTower
//	File:		UtilityManager.h
//	Author:		Mustafa Aldoori
//	Purpose:	Utility Manager to hold Macros for pointers.

#pragma once

#ifndef Safe_Release
	#define Safe_Release( ptr ) if (ptr) { ptr->Release(); ptr = nullptr; }
#endif

#ifndef Safe_Delete
	#define Safe_Delete( ptr ) if (ptr) { delete ptr; ptr = nullptr; }
#endif

#ifndef Safe_Delete_Array
	#define Safe_Delete_Array( ptr ) if (ptr) { delete [] ptr; ptr = nullptr; }
#endif

#ifndef DXError
	#define DXError( a ) { OutputDebugString(a); OutputDebugString( _T( "\n" ) ); return false; }
#endif